args <- commandArgs(TRUE)
setwd(args[1])
#library(affy,lib.loc=args[2])
#library(simpleaffy,lib.loc=args[2])
#library(frma,lib.loc=args[2])
#library(hgu133plus2frmavecs, lib.loc=args[2])
.libPaths("/usr/local/biotools/r/R-2.14.0/lib64/R/library")
library(affy)
library(simpleaffy)
.libPaths("/home/m081429/R/x86_64-unknown-linux-gnu-library/2.12")
library(frma)
library(hgu133plus2frmavecs)
data(hgu133plus2frmavecs)

data<-ReadAffy()
affy.dc5 <- mas5calls(data)
affy.pval <- assayData(affy.dc5)[["se.exprs"]]
write.table(affy.pval,"present_absent.txt",sep="\t",quote=FALSE)
frma<-frma(data, summarize = "robust_weighted_average")
write.exprs(frma,"frma.txt",sep="\t",quote=FALSE)
bar<-barcode(frma,platform="GPL570")
write.table(bar,"barcode.txt",sep="\t",quote=FALSE)
